using System;

namespace CodePlex.CodePlexClientLibrary
{
    [Command("tfsinfo", "Gets TFS information for project", MinArgs = 1, MaxArgs = 1, UsageSummary = "<projectname> [options]")]
    public class TfsInfoCommand : NonAuthenticatedCommand
    {
        readonly ICodePlexProjectInfoService projectInfoService;

        public TfsInfoCommand(ICodePlexProjectInfoService projectInfoService)
        {
            this.projectInfoService = projectInfoService;
        }

        public override void Execute()
        {
            CodePlexTfsProjectInfo info = projectInfoService.GetTfsInfoForProject(Arguments[0]);
            Console.WriteLine("TFS URL = {0}", info.TfsUrl);
            Console.WriteLine("Server Path = {0}", info.ServerPath);
        }
    }
}